<template>
  <div class="HeadContent">
    <div class="HeadContent-box">
      <div class="HeadContent-box-img">
        <img :src="HeadContent.backgroundImg" alt="" />
      </div>
      <div class="HeadContent-box-title">
        <h3 @click="cs">{{ HeadContent.title }}</h3>
        <p>{{ HeadContent.subtitle }}</p>
        <span>{{ HeadContent.status }} {{ HeadContent.updateTime }}</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HeadContent",
  props: ["HeadContent"],
  methods: {
    cs() {
      console.log(this.HeadContent);
    },
  },
};
</script>

<style lang="scss" scoped>
.HeadContent {
  position: absolute;
  top: 0;

  .HeadContent-box {
    position: relative;
    .HeadContent-box-img {
      img {
        width: 100vw;
        height: 16.25rem;
      }
    }
    .HeadContent-box-title {
      width: 95%;
      height: 8.125rem;
      background-color: #d3e1f0;
      padding-left: 1.25rem;
      box-sizing: border-box;
      position: absolute;
      bottom: -50%;
      transform: translateY(-50%);
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      h3 {
        font-size: 1.25rem;
      }
      p {
        color: var(--fontcolor);
        font-size: 0.8125rem;
      }
      span {
        font-size: 0.75rem;
      }
    }
  }
}
</style>